from pms.common.views import PostFormula
from department.utils import department_view
from department.models import Department


class API(PostFormula):

    def handle(self, req):
        did = req['id']
        return self.success_respond(department_view(Department.objects.get(id=did)))
